Skip to content

feat: apply frozen=True to all basemodels in python generated models#1072

Open
va1ha11a wants to merge 1 commit intosupabase:masterfrom
Merge-42:feat/generated-python-models-frozen
Open

feat: apply frozen=True to all basemodels in python generated models#1072
va1ha11a wants to merge 1 commit intosupabase:masterfrom
Merge-42:feat/generated-python-models-frozen

Conversation

@va1ha11a
Copy link
Copy Markdown

What kind of change does this PR introduce?

Feature
When generating models to python the update and insert typed dicts make sense to be mutable but the base models do not (to me at least) and immutability provides some extra protections. i.e. foot gun removal.

What is the current behavior?

Pydantic basemodels are produced mutably

Issue is here
supabase/cli#5142

@o-santi

What is the new behavior?

Pydantic models are set to frozen

Additional context

@va1ha11a va1ha11a requested review from a team, avallete and soedirgo as code owners April 29, 2026 04:55
@va1ha11a va1ha11a changed the title feat: apply frozen=True to all basemodels in pytheon generated models feat: apply frozen=True to all basemodels in python generated models Apr 30, 2026
@avallete avallete requested a review from o-santi April 30, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant